import request from '@/utils/request'



export function tableList(query) {
  return request({
    url: '/mahjong/table/listDetails',
    method: 'get',
    params: query
  })
}
// 查询开桌情况列表
export function listDesking(query) {
  return request({
    url: '/mahjong/desking/list',
    method: 'get',
    params: query
  })
}
export function getOpenTable(query) {
  return request({
    url: '/mahjong/costs/getOpenTableInfo/'+query,
    method: 'get'
  })
}
export function goStart(query) {
  return request({
    url: '/mahjong/desking/goStart/' + query,
    method: 'get'
  })
}
export function endRollback(query) {
  return request({
    url: '/mahjong/desking/endRollback/' + query,
    method: 'get'
  })
}
export function goFinish(query) {
  return request({
    url: '/mahjong/desking/goFinish/' + query,
    method: 'get'
  })
}
export function getStartList(query) {
  return request({
    url: '/mahjong/desking/startList' ,
    method: 'get'
  })
}

export function deskMemberList(query) {
  return request({
    url: '/mahjong/desking/deskMemberList/'+query ,
    method: 'get'
  })
}
export function finishList(query) {
  return request({
    url: '/mahjong/desking/finishList' ,
    method: 'get',
    params: query
  })
}
// 查询开桌情况详细
export function getDesking(id) {
  return request({
    url: '/mahjong/desking/' + id,
    method: 'get'
  })
}

// 新增开桌情况
export function addDesking(data) {
  return request({
    url: '/mahjong/desking',
    method: 'post',
    data: data
  })
}

// 修改开桌情况
export function updateDesking(data) {
  return request({
    url: '/mahjong/desking',
    method: 'put',
    data: data
  })
}

// 停止计费
export function stopTable(orderNumber) {
  return request({
    url: '/mahjong/costs/stop/billing/' + orderNumber,
    method: 'put',
  })
}

// 删除开桌情况
export function delDesking(id) {
  return request({
    url: '/mahjong/desking/' + id,
    method: 'delete'
  })
}

// 导出开桌情况
export function exportDesking(query) {
  return request({
    url: '/mahjong/desking/export',
    method: 'get',
    params: query
  })
}



// 导出开桌情况
export function getChangList(query) {
  return request({
    url: '/mahjong/tablenumber/tabList',
    method: 'get',
    params: query
  })
}


// 查询开桌情况列表
export function restDesking(query) {
  return request({
    url: '/mahjong/table/reset/'+query,
    method: 'get',
    params: query
  })
}
